/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dvdfe8.crochet.modelo.service;

import com.dvdfe8.crochet.modelo.dao.LanaDao;
import com.dvdfe8.crochet.modelo.entity.Lana;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author David
 */
@Service
public class LanaServiceImpl implements LanaService{
    
    @Autowired
    LanaDao lanaDao;

    @Override
    public void crear(Lana lana) {
        lanaDao.crear(lana);
    }

    @Override
    public List<Lana> listarTodos() {
        return lanaDao.listarTodos();
    }

    @Override
    public void eliminar(Lana lana) {
        lanaDao.eliminar(lana);
    }

    @Override
    public Lana getLanaById(int id) {
        return lanaDao.getLanaById(id);
    }

    @Override
    public Lana getLanaByReferencia(String referencia) {
        return lanaDao.getLanaByReferencia(referencia);
    }
    
}
